/*
    This file is part of p4f
    Copyright (C) 2009  Sebastian Fernandez

    p4f is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as 
    published by the Free Software Foundation, either version 3 of the 
    License, or (at your option) any later version.

    p4f is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
*/

#include <native.h>
#include <string>

class Parser{
public:
	Parser(char *data, int length);
	~Parser();
	
	void set_separator(char *separator);
	int find_word(char *word);
	bool goto_pos(int pos);
	bool goto_newline();
	char *get_next();
	//char *get_prev();

protected:
	bool is_inside(char ch, char *text);
	
	char *data;
	char *sep;
	int pos;
	int length;
};
